package com.zhuzl.orderservice.controller.api;

import com.zhuzl.orderservice.api.order.OrderApi;
import com.zhuzl.orderservice.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JZY001
 */
@RestController
public class RestOrderApi implements OrderApi {

    @Autowired
    private OrderService orderService;

    @Override
    public String createOrder(Integer productId, Integer count, Boolean hasError) {
        orderService.createOrder(productId, count, hasError);
        return "OK";
    }
}
